<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no">
    <title>Document</title>
    <script type="text/javascript" src="js/index.js"></script>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/closingRecord.css">
</head>

<body>
    <header>
        <i class="backArrow"></i> 保拍网
    </header>
    <div class="main">
        <ul class="bond-box">


        </ul>
    </div>
    <!--侧边按钮开始-->
    <div class="aside-box">
        <div class="goTopIcon"></div>
        <a style="display:block;" href="tel:4008216623" class="phoneIcon"></a>
    </div>
    <!--侧边按钮结束-->
    <script>
        var p = 1;
        var buy = function (p) {
            var data = { pageNum: p, pageSize: CONFIG.pageSize };
            $.commonAjax({
                url: 'B061',
                type: 'POST',
                data: data,
                isShowError: true,
                success: function (res) {
                    var data = res.data
                    htm = ''
                    $.each(data.data, function (k, v) {

                        console.log(v);
                        htm += '<li class="bond-list">';
                        htm += '    <div class="bondImg">';
                        htm += '        <img src="'+CONFIG.imgUrl+(v.auction.goods?v.auction.goods.iconImages.mediumUrl:'')+'" alt="">';
                        htm += '    </div>';
                        htm += '    <div class="bondInfo">';
                        htm += '        <div class="bondTit">'+v.auction.name+'</div>';
                        htm += '        <div class="closeMoney">成交价：';
                        htm += '            <span>￥'+v.auction.currentPrice+'</span>';
                        htm += '        </div>';
                        htm += '        <div class="startTime">开始时间：'+bp.timestamp_to_date(Number(v.createTime))+'</div>';
                        htm += '        <div class="endTime">开始时间：'+bp.timestamp_to_date(Number(v.auction.endTime))+'</div>';
                        htm += '    </div>';
                        htm += '    <div class="detailsBtn">';
                        htm += '        <div onClick="bp.jump_data(\'details.html?auctionCode='+v.auction.code+'&goodsCode='+(v.auction.goods?v.auction.goods.code:0)+'\')" class="details"></div>';
                        //htm += '        <div class="remove"></div>';
                        htm += '    </div>';
                        htm += '</li>';
                    });
                    $('.bond-box').append(htm)
                }, error: function (res) {
                    $.layermsg(res.msg);
                }
            });
        }
        var t = bp.get_data();
        var getPage = function(){
            p = p+1;
            buy(p);
        }
        $(function () {
            buy(p);
            bp.waterfall();
            /*侧边的控制*/
            $(window).scroll(function () {
                var sTop = $(document).scrollTop();
                if (sTop > 100) {
                    $(".aside-box").show();
                } else if (sTop < 100) {
                    $(".aside-box").hide();
                }
            });

            /*回到顶部*/
            $(".goTopIcon").click(function () {
                $(document).scrollTop(0);
            });
        })
    </script>
</body>

</html>